Telegram Group & Telegram Channel
#собесы #python #senior
Вопросы, которые могут задать на собеседовании Senior Python Developer.
Проверьте себя без помощи поисковиков!


Что такое __slots__ и зачем он нужен?

Пример кода:
class MyClass:
__slots__ = ['x', 'y']

obj = MyClass()
obj.x = 10
obj.y = 20
# obj.z = 30 # Ошибка: нельзя добавить новый атрибут


❗️__slots__ — это атрибут класса, который ограничивает набор атрибутов экземпляра. Он используется для экономии памяти, так как предотвращает создание словаря __dict__ для каждого экземпляра. Однако это ограничивает гибкость, например, добавление новых атрибутов динамически.

Ссылка на
документацию по __slots__
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/job_python/6340
Create:
Last Update:

#собесы #python #senior
Вопросы, которые могут задать на собеседовании Senior Python Developer.
Проверьте себя без помощи поисковиков!


Что такое __slots__ и зачем он нужен?

Пример кода:

class MyClass:
__slots__ = ['x', 'y']

obj = MyClass()
obj.x = 10
obj.y = 20
# obj.z = 30 # Ошибка: нельзя добавить новый атрибут


❗️__slots__ — это атрибут класса, который ограничивает набор атрибутов экземпляра. Он используется для экономии памяти, так как предотвращает создание словаря __dict__ для каждого экземпляра. Однако это ограничивает гибкость, например, добавление новых атрибутов динамически.

Ссылка на
документацию по __slots__

BY Python Job | Вакансии | Стажировки




Share with your friend now:
tg-me.com/job_python/6340

View MORE
Open in Telegram


Python Job | Вакансии | Стажировки Telegram | DID YOU KNOW?

Date: |

Start with a fresh view of investing strategy. The combination of risks and fads this quarter looks to be topping. That means the future is ready to move in.Likely, there will not be a wholesale shift. Company actions will aim to benefit from economic growth, inflationary pressures and a return of market-determined interest rates. In turn, all of that should drive the stock market and investment returns higher.

What is Telegram Possible Future Strategies?

Cryptoassets enthusiasts use this application for their trade activities, and they may make donations for this cause.If somehow Telegram do run out of money to sustain themselves they will probably introduce some features that will not hinder the rudimentary principle of Telegram but provide users with enhanced and enriched experience. This could be similar to features where characters can be customized in a game which directly do not affect the in-game strategies but add to the experience.

Python Job | Вакансии | Стажировки from sg


Telegram Python Job | Вакансии | Стажировки
FROM USA